<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>编辑管理员</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="__CSS__/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__CSS__/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__CSS__/animate.min.css" rel="stylesheet">
    <link href="__CSS__/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__CSS__/style.min.css?v=4.1.0" rel="stylesheet">
    <style>
        .user_upload{
            width: 200px;
        }
    </style>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-8">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form class="form-horizontal m-t">
                        <input type="hidden" name="id" value="{$member.memb_id}">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">账户：</label>
                            <div class="input-group col-sm-4">
                                <input id="username" type="text" class="form-control" aria-required="true" value="{$member.memb_phone}" disabled>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">用户姓名：</label>
                            <div class="input-group col-sm-4">
                                <input id="username" type="text" class="form-control" aria-required="true" value="{$member.memb_truename|default='暂无信息'}" disabled>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">用户身份信息：</label>
                            <div class="input-group col-sm-4">
                                {if $member.memb_cardImage != ''}
                                {volist name="$member.cardimage" id="image"}
                                <img src="data:image/jpg;base64,{$image}" alt="" class="user_upload">
                                {/volist}
                                {else /}
                                &nbsp;&nbsp;    暂无用户数据
                                {/if}
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">是否实名认证：</label>
                            <div class="input-group col-sm-4">
                                <div class="radio i-checks col-sm-4">
                                    <label>
                                        {$member.is_truth}</label>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">是否启用：</label>
                            <div class="input-group col-sm-4">
                                <div class="radio i-checks col-sm-4">
                                    <label>
                                        {$member.status}</label>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>

        </div>
    </div>
</div>
<script src="__JS__/jquery.min.js?v=2.1.4"></script>
<script src="__JS__/bootstrap.min.js?v=3.3.6"></script>
<script src="__JS__/content.min.js?v=1.0.0"></script>
<script src="__JS__/plugins/validate/jquery.validate.min.js"></script>
<script src="__JS__/plugins/validate/messages_zh.min.js"></script>
<script src="__JS__/plugins/iCheck/icheck.min.js"></script>
<script src="__JS__/plugins/layer/layer.min.js"></script>
<script src="__JS__/jquery.form.js"></script>
<script type="text/javascript">

    var index = '';
    function showStart(){
        index = layer.load(0, {shade: false});
        return true;
    }

    function showSuccess(res){

        layer.ready(function(){
            layer.close(index);
            if(1 == res.code){
                layer.alert(res.msg, {title: '友情提示', icon: 1, closeBtn: 0}, function(){
                    window.location.href = res.data;
                });
            }else if(111 == res.code){
                window.location.reload();
            }else{
                layer.msg(res.msg, {anim: 6});
            }
        });
    }


    $(document).ready(function(){
        $(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",});

        // 编辑管理员
        var options = {
            beforeSubmit:showStart,
            success:showSuccess
        };

        $('#commentForm').submit(function(){
            $(this).ajaxSubmit(options);
            return false;
        });
    });


</script>
</body>
</html>
